package my.maybe;

import java.awt.Graphics;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.awt.event.MouseMotionListener;

import javax.swing.JFrame;

public class DrawLine extends JFrame implements MouseListener {
	public int a,b,c,d;
	
	public void mousePressed(MouseEvent arg0) {
		a = arg0.getX();
		b = arg0.getY();	
	}

	public void mouseReleased(MouseEvent arg0) {
		c = arg0.getX();
		d = arg0.getY();
		Graphics line = getGraphics();
		line.drawLine(a, b, c, d);
	}

	@Override
	public void mouseClicked(MouseEvent e) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void mouseEntered(MouseEvent e) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void mouseExited(MouseEvent e) {
		// TODO Auto-generated method stub
		
	}
}
